﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="GridViewExtensionsPage.aspx.cs" Inherits="TestWebSite.UI.WebControls.GridViewExtensionsPage" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContentTitle" runat="server">
    UI.WebControls.GridViewExtensions
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="MainContent" runat="server">
    <fieldset>
        <legend>Methods</legend>
        <dl>
            <dt>InitializeSortingAndPaging&lt;T&gt;</dt>
            <dd>Sets the grid's sorting and paging logic (for the specified Type).</dd>
        </dl>
    </fieldset>
    
    <br />
    <asp:GridView runat="server" ID="grid1" 
        AllowSorting="True" AllowPaging="True" AutoGenerateColumns="False" PageSize="15"
        CellPadding="4" ForeColor="#333333" GridLines="None" BorderStyle="Solid" 
        BorderWidth="1px" BorderColor="#5D7B9D" 
        ondatabinding="grid1_DataBinding" onsorting="grid1_Sorting" onpageindexchanging="grid1_PageIndexChanging" OnPageIndexChanged="grid1_PageIndexChanged" >
        <AlternatingRowStyle BackColor="White" ForeColor="#284775" />
        <Columns>
            <asp:BoundField DataField="Nombre" HeaderText="Nombre" SortExpression="Nombre" />
            <asp:BoundField DataField="Apellido" HeaderText="Apellido" SortExpression="Apellido" />
            <asp:BoundField DataField="Nacimiento" HeaderText="Nacimiento" SortExpression="Nacimiento" />
            <asp:BoundField DataField="Edad" HeaderText="Edad" SortExpression="Edad" />
            <asp:BoundField DataField="Fuma" HeaderText="Fuma" SortExpression="Fuma" />
        </Columns>        
        <EditRowStyle BackColor="#999999" />
        <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <HeaderStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#284775" ForeColor="White" HorizontalAlign="Center" />
        <RowStyle BackColor="#F7F6F3" ForeColor="#333333" />
        <SelectedRowStyle BackColor="#E2DED6" Font-Bold="True" ForeColor="#333333" />
        <SortedAscendingCellStyle BackColor="#E9E7E2" />
        <SortedAscendingHeaderStyle BackColor="#506C8C" />
        <SortedDescendingCellStyle BackColor="#FFFDF8" />
        <SortedDescendingHeaderStyle BackColor="#6F8DAE" />
    </asp:GridView>
    <br />
    Página: <asp:DropDownList runat="server" ID="ddlPagina" AutoPostBack="true" OnSelectedIndexChanged="ddlPagina_SelectedIndexChanged" />
</asp:Content>
